Bentley Map V8i (SELECTseries 10) Help

To Create a Sub-Feature

  1. Create the table with one geometry column, one ID, one angle field, and one foreign key.

    CREATE TABLE DEVICE

    (Id NUMBER PRIMARY KEY,

    LinkedID NUMBER,

    NAME VARCHAR2(50),

    GEOMETRY MDSYS.SDO_GEOMETRY);

  2. Insert the table metadata in the Oracle Spatial metadata.

    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)

    VALUES (‘DEVICE', 'GEOMETRY',

    MDSYS.SDO_DIM_ARRAY

    (MDSYS.SDO_DIM_ELEMENT('X', 714099.913898663, 715312.343907550, 0.000000050),

    MDSYS.SDO_DIM_ELEMENT('Y', 4908438.586694972, 4910715.465519385, 0.000000050) ),

    82247);

    COMMIT;

  3. Create the spatial index of type point to use rotation.

    CREATE INDEX device_idx ON DEVICE(Geometry)

    INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('layer_gtype=point');

  4. Create the foreign key constraint defining the sub-feature.

    alter table DEVICE

    add constraint DEVICECABLE_FK

    foreign key(LINKEDID)

    references CABLE(ID)

    ON DELETE CASCADE;